package com.atguigu08.constructor.exer1;

/**
 * ClassName: Student
 * Package: com.atguigu08.constructor.exer1
 * Description:
 *
 * @Author xiao_qi
 * @Create 2024/5/8 19:13
 * @Version 1.0
 */
public class Student {
    String name;
    int age;
    String school;
    String major;

    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    public Student(String name,int age,String school){
        this.name = name;
        this.age = age;
        this.school = school;

    }
    public Student(String name,int age,String school,String major) {
        this.name = name;
        this.age = age;
        this.school = school;
        this.major = major;
    }
    public String getInfo(){
        return "name = " + name + ",age = " + age +
                ",school = " + school + ", major = " + major;
    }

}
